{extend name="base_mobile" /}
{block name="body"}
<header class="hui-header">
    <div id="hui-back"></div>
    <h1>新增提醒</h1>
    <div id="hui-header-menu" onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap">
    <form action="{:request()->url()}" class="hui-form" method="post">
        <div class="hui-form-items">
            <div class="hui-form-items-title">提醒时间</div>
            <input type="date" name="remind_time" class="hui-button hui-button-large hui-date-picker" placeholder="请选择日期" />
        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">提醒方式</div>
            <div class="hui-form-radios">
                <input type="checkbox" name="jdata[web]" id="c1" onchange="showCheckRes(this);" /><label for="c1">后台提醒</label>
                <input type="checkbox" name="jdata[wechat]" id="c2" onchange="showCheckRes(this);" /><label for="c2">微信提醒</label>
                <input type="checkbox" name="jdata[sms]" id="c3" onchange="showCheckRes(this);" /><label for="c3">短信提醒</label>
            </div>
        </div>
        <div class="hui-form-items">
            <div class="hui-form-items-title">备注</div>
            <div class="hui-form-textarea">
                <textarea name="remark" class="layui-textarea">{$data.remark|default=''}</textarea>
            </div>
        </div>
        
        <div style="padding:15px 8px;">
            <button class="hui-button hui-button-large hui-primary" lay-filter="*" lay-submit="">保存</button>
        </div>
    </form>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
/* 修正 datepicker 样式 */
hui.datePicker();
//获取复选框的值
function showCheckRes(_selfBtn){
    var vals = new Array();
    hui(_selfBtn).parent().find('input').each(function(cObj){
        if(cObj.checked){
            vals.push(cObj.value);
        }
    });
    console.log(vals);
}
</script>
{/block}